Caffe mnist数据集训练

文章作者:Tyan
博客:noahsnail.com  |  CSDN  |  简书

本文是使用基于docker的caffe进行实验。docker启动过程请看docker相关的博客。训练过程如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 进入caffe目录
$:/workspace# cd /opt/caffe/

# 下载mnist数据集
$:/opt/caffe# ./data/mnist/get_mnist.sh

# 将mnist数据集转换成lmdb
$:/opt/caffe# sh examples/mnist/create_mnist.sh

# 修改examples/mnist/lenet_solver.prototxt
将GPU改为CPU

# 运行examples/mnist/train_lenet.sh
$:/opt/caffe# sh examples/mnist/train_lenet.sh


# 训练结果
I1205 09:52:22.457670 33 solver.cpp:329] Iteration 10000, loss = 0.0035313
I1205 09:52:22.457761 33 solver.cpp:349] Iteration 10000, Testing net (#0)
I1205 09:52:27.329227 33 solver.cpp:416] Test net output #0: accuracy = 0.9913
I1205 09:52:27.329305 33 solver.cpp:416] Test net output #1: loss = 0.026992 (* 1 = 0.026992 loss)
I1205 09:52:27.329318 33 solver.cpp:334] Optimization Done.
I1205 09:52:27.329326 33 caffe.cpp:254] Optimization Done.
如果有收获,可以请我喝杯咖啡!